﻿
using BestTrader.Cms.ViewModels;
using FluentValidation;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using BestTrader.Cms.Core.Extensions;

namespace BestTrader.Cms.UserCenter.Validation
{
    public class ManagerBanckCardValidation : AbstractValidator<ManagerModifyBankCardModel>
    {
        public ManagerBanckCardValidation()
        {
            RuleFor(x => x.BankType).NotNull().WithMessage("银行卡类型不能为空");
            RuleFor(x => x.BankProvince).NotNull().WithMessage("银行卡省份不能为空");
            RuleFor(x => x.BankCity).NotNull().WithMessage("银行卡城市不能为空");
            RuleFor(x => x.BankCard).NotEmpty().Length(5, 32).WithMessage("卡号不能为空并且长度不不符");

        }

    }
}
